﻿using System;
using visinia.SmartEngine;
using visinia.SmartEngine.Modules;

public partial class viNews_Modules_InplaceRendering : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Request.QueryString["ModuleId"] == null)
            return;
        int ModuleId = 0;
        Int32.TryParse(Request.QueryString["ModuleId"], out ModuleId);
        ModuleInfo module = ModuleController.GetModule(ModuleId);
        WebModule webmodule = (WebModule)LoadControl(WebRoots.GetModulesRoot + module.ModuleUrl);
        webmodule.ModuleId = module.ModuleId;
        Controls.Add(webmodule);
    }
}
